package com.century.sjt.activity.login;

import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;

import com.century.sjt.R;
import com.century.sjt.activity.BaseActivity;
import com.century.sjt.utils.PreferenceManager;
import com.century.sjt.widget.RippleBackground;

/**
 * Created by 炳基 on 2016/8/22.
 */
public class ChooseCountryButtonActivity extends BaseActivity {
    private RippleBackground choose_country;
    private TextView icon_position;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_choosecountry_button);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);//软键盘设置

        //透明状态栏
        initView();
        initEvent();
    }
    @Override
    protected void initView() {
        choose_country = (RippleBackground) findViewById(R.id.choose_country);
        icon_position = (TextView) findViewById(R.id.icon_position);
        Typeface iconfont = Typeface.createFromAsset(getAssets(), "iconfont.ttf");
        icon_position.setTypeface(iconfont);
    }

    @Override
    protected void initEvent() {
        String language = PreferenceManager.getInstance().getCurrentLanguage();

        icon_position.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    //增加点击放大效果
                    startActivity(new Intent(ChooseCountryButtonActivity.this, ChooseLanguageActivity.class));
                }
            });


        choose_country.startRippleAnimation();

    }

    @Override
    protected void initData() {

    }

}
